package bean;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.datanucleus.annotations.Unowned;

@PersistenceCapable
public class Participate {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	@Unowned
	private Articles article;
	
	@Persistent
	@Unowned
	private Member addMem;
	
	@Persistent
	private int needAmount;

	public Participate(Key key, Articles article, Member addMem, int needAmount) {
		super();
		this.key = key;
		this.article = article;
		this.addMem = addMem;
		this.needAmount = needAmount;
	}

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public Articles getArticle() {
		return article;
	}

	public void setArticle(Articles article) {
		this.article = article;
	}

	public Member getAddMem() {
		return addMem;
	}

	public void setAddMem(Member addMem) {
		this.addMem = addMem;
	}

	public int getNeedAmount() {
		return needAmount;
	}

	public void setNeedAmount(int needAmount) {
		this.needAmount = needAmount;
	}
}
